/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui.Ventas;

import Atxy2k.CustomTextField.RestrictedTextField;
import Controlador.Bean.Ventas.Cliente;
import Controlador.Bean.Ventas.ClienteBusqueda;
import Controlador.Service.Seguridad.ServicioPerfil;
import gui.General.Main;
import java.util.ArrayList;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableRowSorter;
/**
 *
 * @author Luis Enrique
 */
public class ClienteBuscarPanel extends javax.swing.JPanel {

    ClienteTableModel myTableModel;
    private JDialog parent;
    private CotizacionRegistrarPanel RefClientePanel;
    ArrayList<Cliente> clientes = Controlador.Service.Ventas.GestionVentas.getInstance().queryAllClientes();
    
    public void setRefClientePanel(CotizacionRegistrarPanel panel){
        RefClientePanel = panel;
    }
    
    public void setParent(JDialog parent){
        this.parent = parent;
    }
    
    class ClienteTableModel extends AbstractTableModel{
        String [] titles = {"Código","Tipo","Razón Social/Nombres","Número de Doc."};

        @Override
        public int getRowCount() {
            return clientes.size();
        }

        @Override
        public int getColumnCount() {
            return titles.length;
        }

        @Override
        public Object getValueAt(int rowIndex, int columnIndex) {
            String res=null;
            Cliente c = clientes.get(rowIndex);
            switch(columnIndex){
                case 0: res = c.getIdCliente(); break;
                case 1: res = (c.getTipo().equals("TPJ"))?"Jurídica":"Natural";break;
                case 2: res = (c.getRazonSocial()!=null)?c.getRazonSocial():(c.getApePaterno()+" "+c.getApeMaterno()+", "+c.getNombres());break;
                case 3: res = c.getNumDocumento();break;
            }
            return res;
        }
        
        @Override
        public String getColumnName(int col){
            return titles[col];
        }
    }
    
    public ClienteBuscarPanel() {
        initComponents();
        btnGpTipoPersona.add(rbPJuridica);
        btnGpTipoPersona.add(rbPNatural);
        btnGpTipoDocumento.add(rbRUC);
        btnGpTipoDocumento.add(rbDNI);
              
        RestrictedTextField restricted = new RestrictedTextField(txtRazonSocial);
        restricted.setLimit(50);
        
        restricted = new RestrictedTextField(txtApePaterno);
        restricted.setLimit(50);
        restricted.setOnlyText(true);
                
        restricted = new RestrictedTextField(txtApeMaterno);
        restricted.setLimit(50);
        restricted.setOnlyText(true);
        
        restricted = new RestrictedTextField(txtNombres);
        restricted.setLimit(50);
        restricted.setOnlyText(true);
        
        restricted = new RestrictedTextField(txtNumDoc);
        restricted.setLimit(11);
        restricted.setOnlyNums(true);
        
        myTableModel = new ClienteTableModel();
        tblClientes.setModel(myTableModel);
        TableRowSorter<ClienteTableModel> sorter = new TableRowSorter<ClienteTableModel> ((ClienteTableModel) tblClientes.getModel());
        tblClientes.setRowSorter(sorter);
    }

    public void refreshItemsTable(){
        clientes = Controlador.Service.Ventas.GestionVentas.getInstance().queryAllClientes();
        myTableModel.fireTableChanged(null);        
    }
    
    public void refreshItemsTable2(ArrayList<Cliente> clientes){
        this.clientes = new ArrayList(clientes);
        myTableModel.fireTableChanged(null);        
    }
    
    public void refreshDetails(){
        if(rbPJuridica.isSelected()){
            txtRazonSocial.setText("");
            txtRazonSocial.setEnabled(true);
            txtApePaterno.setText("");
            txtApePaterno.setEnabled(false);
            txtApeMaterno.setText("");
            txtApeMaterno.setEnabled(false);
            txtNombres.setText("");
            txtNombres.setEnabled(false);
            btnGpTipoDocumento.clearSelection();
            rbRUC.setEnabled(true);
            rbDNI.setEnabled(false);
            txtNumDoc.setText("");
            txtNumDoc.setEnabled(true);
        }
        else{
            txtRazonSocial.setText("");
            txtRazonSocial.setEnabled(false);
            txtApePaterno.setText("");
            txtApePaterno.setEnabled(true);
            txtApeMaterno.setText("");
            txtApeMaterno.setEnabled(true);
            txtNombres.setText("");
            txtNombres.setEnabled(true);
            btnGpTipoDocumento.clearSelection();
            rbRUC.setEnabled(true);
            rbDNI.setEnabled(true);            
            txtNumDoc.setText("");
            txtNumDoc.setEnabled(true);
        }    
    }
    
    public void limpiarCriterios(){
        btnGpTipoPersona.clearSelection();
        txtRazonSocial.setText("");
        txtRazonSocial.setEnabled(true);
        txtApePaterno.setText("");
        txtApePaterno.setEnabled(true);
        txtApeMaterno.setText("");
        txtApeMaterno.setEnabled(true);
        txtNombres.setText("");
        txtNombres.setEnabled(true);
        btnGpTipoDocumento.clearSelection();
        rbRUC.setEnabled(true);
        rbDNI.setEnabled(true);
        txtNumDoc.setText("");
        txtNumDoc.setEnabled(true);
    }
    
    public boolean valido(){
        boolean b = true;
        
        if(rbRUC.isSelected())
            if(!txtNumDoc.getText().isEmpty())
                if(txtNumDoc.getText().length()!=11){
                    b = false;
                    JOptionPane.showMessageDialog(this, "Error en Num. de Documento RUC", "Error en los datos", JOptionPane.OK_OPTION);
                }           
        if(rbDNI.isSelected())
            if(!txtNumDoc.getText().isEmpty())
                if(txtNumDoc.getText().length()!=8){
                    b = false;
                    JOptionPane.showMessageDialog(this, "Error en Num. de Documento DNI", "Error en los datos", JOptionPane.OK_OPTION);
                }
        return b;
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnGpTipoPersona = new javax.swing.ButtonGroup();
        btnGpTipoDocumento = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblClientes = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        rbPJuridica = new javax.swing.JRadioButton();
        rbPNatural = new javax.swing.JRadioButton();
        jLabel2 = new javax.swing.JLabel();
        txtRazonSocial = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        txtApePaterno = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        txtApeMaterno = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        txtNombres = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        rbRUC = new javax.swing.JRadioButton();
        rbDNI = new javax.swing.JRadioButton();
        jLabel7 = new javax.swing.JLabel();
        txtNumDoc = new javax.swing.JTextField();
        btnBuscar = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        btnNuevo = new javax.swing.JButton();

        setMaximumSize(new java.awt.Dimension(419, 588));
        setMinimumSize(new java.awt.Dimension(419, 588));
        setPreferredSize(new java.awt.Dimension(419, 588));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista de Clientes"));
        jPanel1.setToolTipText("");
        jPanel1.setMaximumSize(new java.awt.Dimension(399, 235));
        jPanel1.setMinimumSize(new java.awt.Dimension(399, 235));
        jPanel1.setPreferredSize(new java.awt.Dimension(399, 235));
        jPanel1.setLayout(new java.awt.BorderLayout());

        tblClientes.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblClientes.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tblClientes.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblClientesMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(tblClientes);

        jPanel1.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Criterios de Búsqueda"));
        jPanel2.setMaximumSize(new java.awt.Dimension(399, 282));
        jPanel2.setMinimumSize(new java.awt.Dimension(399, 282));

        jLabel1.setText("Tipo de Persona");

        rbPJuridica.setText("P. Jurídica");
        rbPJuridica.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbPJuridicaActionPerformed(evt);
            }
        });

        rbPNatural.setText("P. Natural");
        rbPNatural.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbPNaturalActionPerformed(evt);
            }
        });

        jLabel2.setText("Razón Social");

        jLabel3.setText("Ape. Paterno");

        jLabel4.setText("Ape. Materno");

        jLabel5.setText("Nombres");

        jLabel6.setText("Tipo de Doc.");

        rbRUC.setText("R.U.C.");

        rbDNI.setText("D.N.I.");

        jLabel7.setText("Número de Doc.");

        btnBuscar.setText("Buscar");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });

        btnLimpiar.setText("Limpiar");
        btnLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarActionPerformed(evt);
            }
        });

        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel15.setText("R.U.C. (11 dígitos) y D.N.I. (8 dígitos)");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addComponent(btnBuscar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(btnLimpiar))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel7))
                        .addGap(40, 40, 40)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNumDoc)
                            .addComponent(txtApeMaterno)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(txtApePaterno, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(txtRazonSocial)
                                        .addComponent(txtNombres, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addComponent(rbPJuridica)
                                        .addGap(18, 18, 18)
                                        .addComponent(rbPNatural))
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addComponent(rbRUC)
                                        .addGap(18, 18, 18)
                                        .addComponent(rbDNI)))
                                .addGap(0, 0, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(rbPNatural)
                    .addComponent(rbPJuridica))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtRazonSocial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtApePaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtApeMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNombres, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbDNI)
                    .addComponent(rbRUC)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNumDoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnLimpiar)
                    .addComponent(btnBuscar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnNuevo.setText("Nuevo Cliente");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnNuevo)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnNuevo)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void rbPNaturalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbPNaturalActionPerformed
        refreshDetails();
    }//GEN-LAST:event_rbPNaturalActionPerformed

    private void rbPJuridicaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbPJuridicaActionPerformed
        refreshDetails();
    }//GEN-LAST:event_rbPJuridicaActionPerformed

    private void btnLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarActionPerformed
        limpiarCriterios();
    }//GEN-LAST:event_btnLimpiarActionPerformed

    private void tblClientesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblClientesMouseClicked
        if(evt.getClickCount()==2){
            int rowSel = tblClientes.getSelectedRow();
            RefClientePanel.c = clientes.get(rowSel);     
            RefClientePanel.llenaCliente();
            parent.dispose();
        }
    }//GEN-LAST:event_tblClientesMouseClicked

    private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        if(valido()){
            String tipo;
            if(rbPJuridica.isSelected())
                tipo = "TPJ";
            else if (rbPNatural.isSelected())
                tipo = "TPN";
            else
                tipo=null;
            String razonSocial = (txtRazonSocial.getText().equals(""))?null:"%"+txtRazonSocial.getText()+"%";
            String apePaterno = (txtApePaterno.getText().equals(""))?null:"%"+txtApePaterno.getText()+"%";
            String apeMaterno = (txtApeMaterno.getText().equals(""))?null:"%"+txtApeMaterno.getText()+"%";
            String nombres = (txtNombres.getText().equals(""))?null:"%"+txtNombres.getText()+"%";
            String tipoDoc;
            if(rbDNI.isSelected())
                tipoDoc = "dni";
            else if (rbRUC.isSelected())
                tipoDoc = "ruc";
            else
                tipoDoc=null;
            String numDoc = (txtNumDoc.getText().equals(""))?null:txtNumDoc.getText();

            ClienteBusqueda clienteBusqueda = new ClienteBusqueda(tipo,razonSocial,apePaterno,apeMaterno,nombres,tipoDoc,numDoc,null);
            ArrayList<Cliente> clientesConsulta = Controlador.Service.Ventas.GestionVentas.getInstance().queryClientes(clienteBusqueda);
            refreshItemsTable2(clientesConsulta);
        }
    }//GEN-LAST:event_btnBuscarActionPerformed

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
    if(ServicioPerfil.verificarPermiso(Main.usu.getIdUsuario(), "VNTCLIEN", "ACC000")){   
        ClienteAgregarJDialog agregarDialog = new ClienteAgregarJDialog(null, true);
        agregarDialog.setRefClientePanel2(this);
        agregarDialog.setVisible(true);
    }
    else
        JOptionPane.showMessageDialog(this,"Usted no tiene permisos para ingresar a esta ventana");        
    }//GEN-LAST:event_btnNuevoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.ButtonGroup btnGpTipoDocumento;
    private javax.swing.ButtonGroup btnGpTipoPersona;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JRadioButton rbDNI;
    private javax.swing.JRadioButton rbPJuridica;
    private javax.swing.JRadioButton rbPNatural;
    private javax.swing.JRadioButton rbRUC;
    private javax.swing.JTable tblClientes;
    private javax.swing.JTextField txtApeMaterno;
    private javax.swing.JTextField txtApePaterno;
    private javax.swing.JTextField txtNombres;
    private javax.swing.JTextField txtNumDoc;
    private javax.swing.JTextField txtRazonSocial;
    // End of variables declaration//GEN-END:variables
}
